<template>
  <div style="background: #20a0ff;width: 100%;height: 100%">
    <div>欢迎 宏烨经纪人
      <template>
        <span style="color: greenyellow">
        {{brokerHomePage.brokerLoginVo.name}}
      </span>
      </template>
      登录世界上最大、ceo最牛逼的系统</div>
    <div style="text-align: center">
      <el-col>
        <el-avatar :src="brokerHomePage.brokerLoginVo.images"  :size="size"></el-avatar>
      </el-col>
      <el-col>
        <span>{{brokerHomePage.brokerLoginVo.name}}</span>
      </el-col>
    </div>
    <div style="text-align: center">
      <el-form ref="form" :model="brokerHomePage" style="width: 100%" :inline=true>
        <el-form-item label="新房数量"  >
          {{brokerHomePage.newHouseNum}}
        </el-form-item>
        <el-form-item label="二手房数量">
          {{brokerHomePage.secondHouseNum}}
        </el-form-item>
        <el-form-item label="出租房数量">
          {{brokerHomePage.noSellHouseNum}}
        </el-form-item>
      </el-form>
    </div>
    <div style="text-align: center;height: 50px">
      <el-table
        :data="brokerHomePage.configList"
        style="width: 100%;text-align: center"
        :border=false>
          <el-table-column
            width="180">
            <template slot-scope="scope">
              <el-form :model="scope.row">
                <el-col style="text-align: center">
                  <el-image :src="scope.row.imageUrl" style="width: 80px;height: 60px"></el-image>
                </el-col>
                <el-col style="text-align: center">
                  <el-link type="primary" :href="scope.row.linkUrl">{{scope.row.title}}</el-link>
                </el-col>
              </el-form>
            </template>
          </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import { findHomePageInformation } from '@/api/broker/broker'
export default {
  name: 'Index',
  data() {
    return {
      size: 60,
      brokerHomePage: {}
    }
  },
  created() {
    this.findHomePage()
  },
  methods: {
    o() {
      this.$router.push({
        path: '/broker/messagePage'
      })
    },
    errorHandler() {
      return true
    },
    // 查找首页信息
    findHomePage() {
      findHomePageInformation().then(res => {
        this.brokerHomePage = res.data
      })
    }
  }
}
</script>
<style scoped>
</style>
